<?php

include_once "../../common/sql.php";

$id=$_POST['id'];
$conn=connect();
$sql="delete from categories where id='$id'";
$bool=mysqli_query($conn,$sql);

$res=["code"=>0,"msg"=>'删除分类信息错误'];

if($bool){
    $res['code']=1;
     $res['msg']='删除分类信息成功';
}

echo json_encode($res);
?>